package cn.tedu._03vehicle.base.config;

import cn.tedu._03vehicle.base.interceptor.int1;
import cn.tedu._03vehicle.base.interceptor.logincheck;
import cn.tedu._03vehicle.base.interceptor.timecount;
import cn.tedu._03vehicle.base.interceptor.usetime;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class intconfig implements WebMvcConfigurer
{
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new int1())
//                .addPathPatterns("/user/**")
//                .excludePathPatterns("/user/login");
        registry.addInterceptor(new usetime())
                .addPathPatterns("/user/**");
        registry.addInterceptor(new logincheck())
                .addPathPatterns("/user/current","/user/logout");
        registry.addInterceptor(new timecount())
                .addPathPatterns("/user/**");

    }
}
